package com.sinosoft.jike.dto;

public class RuleNormal implements Rule{
    private Integer integer;
    private Float aFloat;
    private Boolean aBoolean;

    public RuleNormal() {
    }

    public Integer getInteger() {
        return integer;
    }

    public void setInteger(Integer integer) {
        this.integer = integer;
    }

    public Float getaFloat() {
        return aFloat;
    }

    public void setaFloat(Float aFloat) {
        this.aFloat = aFloat;
    }

    public Boolean getaBoolean() {
        return aBoolean;
    }

    public void setaBoolean(Boolean aBoolean) {
        this.aBoolean = aBoolean;
    }

    public String getDefaultValue(String key) {
        String result = "";
        if (key.equals("integer")){
            result = "0";
        }

        if (key.equals("aFloat")){
            result = "0";
        }

        if (key.equals("aBoolean")){
            result = "true";
        }
        return result;
    }
}
